$(document).ready(function(){
    $(".submit-btn").click(function() {
        var roleId = $("input:radio[name='role']:checked").val() ;
        var eid = $("#eid").val();
        // alert('roleId'+roleId);
        if(roleId === '' || roleId === undefined){
            alert('请先选择角色!');
        }else {
            $.post(
                "/admin/modifyRoleByTeacher",
                {"roleId": roleId,"eid":eid},
                function (data, status) {
                    console.log('status:' + status);
                    if (status) {
                        window.location.href = "/admin/roleConfigure";
                    }
                }
            );
        }
    });
});


function cancel() {
    window.location.href="/admin/roleConfigure";
}